/**
 * Copyright (C) 2010-2011 TVH Group NV. <kalman.tiboldi@tvh.com>
 *
 * This file is part of the MyStroBe project.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * 		http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
 package net.mystrobe.client.connector.quarixbackend.datatypes;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;

import net.mystrobe.client.SchemaColumnProperties;
import net.mystrobe.client.connector.quarixbackend.Generated;
import net.mystrobe.client.connector.quarixbackend.GeneratorMeta;
import net.mystrobe.client.impl.DAOSchema;

/**
 * 
 * This class was generated by net.mystrobe.client.connector.quarixbackend.ClassGenerator
 * 
 * Used parameters: appName: wicketds dsName: server.state doName: tt-state
 * 
 */

@GeneratorMeta(appName="wicketds", urn="server.state", dsName="server.state", dsId="dsState", daoId="tt-state", isLocked=false)
public class StateStateSchema extends DAOSchema<StateState> {

	@Generated
	public enum Cols {
		
		STATE("state"),
		STATENAME("state-name"),
		REGION("region")
		;

		private String columnName;
			
		private Cols(String columnName) {
			this.columnName = columnName;
		}

		public String id() {
			return columnName;
		}	

		public String toString() {
			return columnName;
		}
	}

	@Generated
	public StateStateSchema() {
		asignValues();
	}

	@Generated
	private void asignValues() {
		daoId = "tt-state";
		iDataTypeClass = StateState.class;
		batchSize = 10;
		margin = 5;
		isAutosync = true;
		isOpenOnInit = true;
		isSendChangesOnly = true;
		isSetFilterEveryTime = true;

		properties = new LinkedHashMap<String, Map<SchemaColumnProperties, String>>();

		Map<SchemaColumnProperties, String> rowidProp = new HashMap<SchemaColumnProperties, String>();
		rowidProp.put(SchemaColumnProperties.ReadOnly, "");
		rowidProp.put(SchemaColumnProperties.Format, "");
		rowidProp.put(SchemaColumnProperties.Type, "character");
		rowidProp.put(SchemaColumnProperties.DefaultValue, "");
		rowidProp.put(SchemaColumnProperties.Required, "");
		rowidProp.put(SchemaColumnProperties.Sortable, "");
		rowidProp.put(SchemaColumnProperties.Label, "");
		rowidProp.put(SchemaColumnProperties.Tooltip, "");
		rowidProp.put(SchemaColumnProperties.ViewAs, "");
		properties.put("rowid", rowidProp);

		Map<SchemaColumnProperties, String> rowstateProp = new HashMap<SchemaColumnProperties, String>();
		rowstateProp.put(SchemaColumnProperties.ReadOnly, "");
		rowstateProp.put(SchemaColumnProperties.Format, "");
		rowstateProp.put(SchemaColumnProperties.Type, "integer");
		rowstateProp.put(SchemaColumnProperties.DefaultValue, "0");
		rowstateProp.put(SchemaColumnProperties.Required, "");
		rowstateProp.put(SchemaColumnProperties.Sortable, "");
		rowstateProp.put(SchemaColumnProperties.Label, "");
		rowstateProp.put(SchemaColumnProperties.Tooltip, "");
		rowstateProp.put(SchemaColumnProperties.ViewAs, "");
		properties.put("rowstate", rowstateProp);

		Map<SchemaColumnProperties, String> stateProp = new HashMap<SchemaColumnProperties, String>();
		stateProp.put(SchemaColumnProperties.ReadOnly, "");
		stateProp.put(SchemaColumnProperties.Format, "!!");
		stateProp.put(SchemaColumnProperties.Type, "character");
		stateProp.put(SchemaColumnProperties.DefaultValue, "");
		stateProp.put(SchemaColumnProperties.Required, "false");
		stateProp.put(SchemaColumnProperties.Sortable, "true ");
		stateProp.put(SchemaColumnProperties.Label, "State");
		stateProp.put(SchemaColumnProperties.Tooltip, "State abbreviation");
		stateProp.put(SchemaColumnProperties.ViewAs, "fill-in");
		properties.put("state", stateProp);

		Map<SchemaColumnProperties, String> statenameProp = new HashMap<SchemaColumnProperties, String>();
		statenameProp.put(SchemaColumnProperties.ReadOnly, "");
		statenameProp.put(SchemaColumnProperties.Format, "x(15)");
		statenameProp.put(SchemaColumnProperties.Type, "character");
		statenameProp.put(SchemaColumnProperties.DefaultValue, "");
		statenameProp.put(SchemaColumnProperties.Required, "false");
		statenameProp.put(SchemaColumnProperties.Sortable, "false");
		statenameProp.put(SchemaColumnProperties.Label, "State-Name");
		statenameProp.put(SchemaColumnProperties.Tooltip, "Full state name");
		statenameProp.put(SchemaColumnProperties.ViewAs, "fill-in");
		properties.put("state-name", statenameProp);

		Map<SchemaColumnProperties, String> regionProp = new HashMap<SchemaColumnProperties, String>();
		regionProp.put(SchemaColumnProperties.ReadOnly, "");
		regionProp.put(SchemaColumnProperties.Format, "x(8)");
		regionProp.put(SchemaColumnProperties.Type, "character");
		regionProp.put(SchemaColumnProperties.DefaultValue, "");
		regionProp.put(SchemaColumnProperties.Required, "false");
		regionProp.put(SchemaColumnProperties.Sortable, "false");
		regionProp.put(SchemaColumnProperties.Label, "Region");
		regionProp.put(SchemaColumnProperties.Tooltip, "Sales region for state");
		regionProp.put(SchemaColumnProperties.ViewAs, "fill-in");
		properties.put("region", regionProp);
	}
	
	
}

